var amapFile = require('../../libs/amap-wx.130.js');//如：..­/..­/libs/amap-wx.js

Page({
  data: {
    weather: {},
  },
  onLoad: function() {
    var that = this;
    var myAmapFun = new amapFile.AMapWX({key: 'b015a76906a9725193670ee411d4a6d9'});
    myAmapFun.getWeather({
      success: function(data){
        that.setData({
          weather: data
        });
      },
      fail: function(info){
        // wx.showModal({title:info.errMsg})
      }
    })
  }
})